class PasswordsController < ApplicationController

  def edit
    @user = User.current
  end

  def update
    @user = User.current
    if @user.update_attributes params[:user]
      flash[:success] = '• 已成功修改，请妥善保管密码！'
      redirect_to current_user_url(@user.id)
    else
      render :edit
    end
  end
end
